package training;

import java.util.Scanner;

//https://www.nowcoder.com/questionTerminal/610e6c0387a0401fb96675f58cda8559
public class Day35_01 {
    // 先算D(n) D(n) = (n-1)*(D(n-1)+D(n-2))
    public static final long[] arr = new long[21];
    public static void cal(){
        arr[2] = 1;
        for (int i = 3; i < arr.length; i++) {
            arr[i] = (i-1) * (arr[i-1] + arr[i-2]);
        }
    }

    public static long cal1(int n){
        if(n == 1){
            return 1;
        }
        return n * cal1(n-1);
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        cal();
        while (scanner.hasNext()) {
            int n = scanner.nextInt();
            double res = 100.0 * arr[n]/cal1(n);
            System.out.printf("%.2f%%\n",res);
        }
    }
}
